package com.ziq.zcamp.bean.post

import com.blankj.utilcode.util.GsonUtils
import com.ziq.zcamp.proguard.ProguardKeep
import java.io.Serializable

class CampInfo : ProguardKeep, Serializable {
        var id :Int? = null
        var camp_name :String? = null
        var location_addr :String? = null
        var longitude :String? = null
        var latitude :String? = null
        var pictures : String? = null
        
        var images : List<ImageInfo>? = null


        //3.17.00
        //营地分数
        var camp_score :Int ?= null
        //是否收藏
        var is_collect :Boolean ?= null

        fun parseData(){
                var imageList: List<ImageInfo> =  mutableListOf<ImageInfo>()
                if (pictures?.isNotEmpty() == true){
                        pictures?.let {
                                imageList = GsonUtils.fromJson(it, GsonUtils.getListType(
                                        ImageInfo::class.java))
                        }
                }
                images = imageList
        }
    }